package cn.edu.neusoft.maxingxin231.yuejian06.Adapter;

import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;

import java.util.List;

import cn.edu.neusoft.maxingxin231.yuejian06.Bean.CourseBean;
import cn.edu.neusoft.maxingxin231.yuejian06.Bean.OrderListBean;
import cn.edu.neusoft.maxingxin231.yuejian06.Model.OrderListModel;

public class FinishOrderAdapter extends BaseOrderAdapter<OrderListBean> {
    String id,order_name,order_data,order_price,order_num;


    public FinishOrderAdapter(Context context, List<OrderListBean> items, int layoutResource) {
        super(context, items, layoutResource);
    }

    @Override
    public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
        OrderListBean orderListBean = items.get(position);
        if (orderListBean == null)return;
        AfterOrderViewHolder afterOrderViewHolder = (AfterOrderViewHolder)holder;
        afterOrderViewHolder.tv_ordername.setText(orderListBean.getName());
        afterOrderViewHolder.tv_ordernum.setText(orderListBean.getOrder_number());
        afterOrderViewHolder.tv_orderprice.setText(orderListBean.getOrder_price());
        afterOrderViewHolder.tv_orderdata.setText(orderListBean.getOrder_date());

        id= getUserID();
        order_name = orderListBean.getName();
        order_num = orderListBean.getOrder_number();
        order_price = orderListBean.getOrder_price();
        order_data = orderListBean.getOrder_date();
    }
    public void setList(List<OrderListBean> list){
        this.items = list;
        notifyDataSetChanged();
    }
}
